var app = getApp();
Page({
  /**
   * 页面的初始数据
   */
  data: {
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
  },
  goOrderList(e){
    var type = e.currentTarget.dataset.type;
    var isLogin = app.getStorageSync("isLogin");
    if(isLogin == 0){
      wx.navigateTo({
        url: '/pages/login/index',
      })
    }else{
      if(type == 'product'){
        this.goProductOrder();
      }
    }
  },
  goProductOrder(){
    wx.navigateTo({
      url: '/pages/order/productList/index?from_type=0&state=-1&index=0',
    })
  },
  goAgOrderList(){
    wx.navigateTo({
      url: '/pages/order/agList/index',
    })
  }
})